﻿using System;
using System.Html;

namespace RexToy.Ajax
{
    public class Request
    {
        public string Url { get; set; }
        public Method Method { get; set; }
        public DataFormat Format { get; set; }
        public string data { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public Action<object, XmlHttpRequest> OnSuccess { get; set; }
        public Action<object, XmlHttpRequest> OnFailure { get; set; }
        public object Headers { get; set; }


        public Request(RequestOptions options)
        {
        }

        public void Call()
        {
        }

        public void Call(RequestOptions options)
        {
        }
    }

    public class RequestOptions
    {
        public string url;
        public Method method;
        public DataFormat format;
        public string data;
        public string username;
        public string password;
        public Action<object, XmlHttpRequest> onSuccess;
        public Action<object, XmlHttpRequest> onFailure;

        public object headers;        
    }
}
